package com.fengxu.nio.groupchat;

import java.io.IOException;
import java.util.Scanner;

/**
*@Description 群聊客户端测试
*@Author 风珝
*@Date 2020/12/3 14:32
*@Version 1.0.0
*/
public class ClientTest {

    public static void main(String[] args) throws IOException {
        ChatClient chatClient = new ChatClient();
        new Thread(()->{
            chatClient.run();
        }).start();
        Scanner scanner = new Scanner(System.in);
        while (true){
            String msg = scanner.nextLine();
            chatClient.sendMessage(msg);
        }

    }
}
